package service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import dao.PersonDao;
import pojo.Person;
import service.PersonDaoManager;
@Service(value="personDaoManager")
public class PersonDaoManagerImpl implements PersonDaoManager {
	@Autowired
	@Qualifier(value="personDao")
	private PersonDao manager;
	
	public PersonDaoManagerImpl() {
		System.out.println("perosnDaoImpl init success.....");
	}
	@Override
	public Person addPerson(Person person) {
		return manager.addPerson(person);
	}

	@Override
	public int deletePerson(String id) {
		return manager.deletePerson(id);
	}

	@Override
	public Person updatePerson(Person person) {
		return manager.updatePerson(person);
	}

	@Override
	public List<Person> findAllPerson() {
		return manager.findAllPerson();
	}

}
